<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var a = 10;
        function daoTime() {
            var time = a + "秒后跳转百度"
            document.getElementById("now").innerText = time;
            a--;
            if(a==0){
                window.open("http://www.baidu.com");
            }
            setTimeout("daoTime()",1000);
        }

    </script>
</head>
<body onload="daoTime()">
<div id = "now">
    <input type="button" value="没用的"/>
</div>
</body>
</html>